<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html lang="zh">
<head>
    <title>客服问题记录</title>
    <jsp:include page="/WEB-INF/view/commons/css.jsp" />
</head>
<body >
<div id="main-container" class="container-fluid">
    <form  action="bizCustomerManage/${action eq "create" ?"save":"update"}" name="inputForm" id="inputForm" method="post" class="form-horizontal">
    <input name="id" id="id" value="${entity.id}" type="hidden" />
    <input name="recorder" id="recorder" value="${entity.recorder}" type="hidden" />
    <div class="form-group">
        <label class="col-sm-1 control-label">经销商名称：</label>
        <div class="col-md-4">
            <input type="text" class="form-control" name="name" value="${entity.name}" placeholder="经销商名称">
        </div>
        <label class="col-sm-1 control-label">问题类型：</label>
        <div class="col-md-4">
                <d:select clazz="selectpicker" name="problemType" list="${problemTypes}" selected="${entity.problemType}"/>
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-1 control-label">问题详细：</label>
        <div class="col-md-4">
            <input type="text" class="form-control" name="problem" value="${entity.problem}" placeholder="问题详细">
        </div>
        <label class="col-sm-1 control-label">反馈人：</label>
        <div class="col-md-4">
            <input type="text" class="form-control" name="feedbackPerson" value="${entity.feedbackPerson}" placeholder="反馈人">
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-1 control-label">联系方式：</label>
        <div class="col-md-4">
            <input type="text" class="form-control" name="mobile" value="${entity.mobile}" placeholder="联系方式">
        </div>
       	<label class="col-sm-1 control-label">反馈时间：</label>
        <div class="col-md-4">
            <input type="text" class="span1 Wdate" style="width:48%" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm'})" id="feedbackDate" name="feedback" value="${entity.feedbackDateStr}" placeholder="反馈时间" />
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-1 control-label">解决人：</label>
        <div class="col-md-4">
            <input type="text" class="form-control" name="solvePerson" value="${entity.solvePerson}" placeholder="解决人">
        </div>
        <label class="col-sm-1 control-label">备注：</label>
        <div class="col-md-4">
            <input type="text" class="form-control" name="remark" value="${entity.remark}" placeholder="备注">
        </div>
    </div>
    <div class="form-group">
         <label class="col-sm-1 control-label">解决进度：</label>
        <div class="col-md-4">
                <d:select clazz="selectpicker" name="solveProgress" list="${solveProgresss}" selected="${entity.solveProgress}"/>
        </div>
         <label class="col-sm-1 control-label">解决时间：</label>
		<div class="col-md-4">
			<input type="text" class="span1 Wdate" style="width:48%" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" id="solveDate" name="solveDate" value="${entity.solveDateStr}" placeholder="解决时间" />
		</div>
    </div>
    <div class="form-group">
        <div class="col-sm-offset-1 col-sm-2">
            <button id="saveBtn" type="submit" class="btn btn-sm btn-primary"><i class="fa fa-floppy-o"></i> 提交</button>
            <button type="button" class="btn btn-sm link_close"><i class="fa fa-close"></i> 关闭</button>
        </div>
    </div>
    </form>
</div><!--/#main-container-->

<!-- script start -->
<jsp:include page="/WEB-INF/view/commons/js.jsp" />
<script type="text/javascript">
    $(document).ready(function(e) {
        var options = {
            rules:{
                name : { required : true, maxlength : 50 },
                problemType : { required : true, maxlength : 40 },
                problem : { required : true, maxlength : 100 },
                feedbackPerson : { maxlength : 20 },
                mobile : { maxlength : 30 },
                solveProgress : { required : true, maxlength : 20 },
                solvePerson : { maxlength : 20 },
                feedbackDate : { required : true },
                solveDate : { required : false },
                remark : { required : false, maxlength : 100 }
            },
            submitHandler:function(form){
                $(form).ajaxSubmit({
                    type:'post',
                    dataType:'json',
                    success:function(data){
                        if(data.success){
                            $('#searchBtn', parent.document).click();
                            closeIframe();
                        }else{
                            layer.alert(data.msg);
                        }
                    }
                });
            }
        };
        $("#inputForm").validate(options);
    });
</script>
<!-- script end -->
</body>
</html>
